package com.example.node.base;

import android.app.Application;
import com.example.node.utils.ProcessUtils;

/**
 * Application:
 * 生命周期最长,初始化动作,但每一个进程都会创建
 * 应用默认有一个空的Application
 * PID:android.io.Process.myPid()
 */

public class BaseApplication extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        //主进程初始化
        if(getApplicationInfo().packageName.equals(ProcessUtils.getTopProcess())){
            init();
        }
    }

    //初始化
    private void init() {

    }
}
